package com.hue.netty.day01.two;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;

public class HttpServerChannelInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        socketChannel.pipeline().
                addLast("httpServerCodec", new HttpServerCodec()).   //netty提供的http编解码器
                addLast("httpServerHandler", new HttpServerHandler());
        System.out.println("...");
    }
}
